package com.flute.tools.xml;

import org.jdom.Attribute;

public class AttributeXmlNode implements IXmlNode {
	private String name;
	private String value;

	public AttributeXmlNode() {
	}
	
	public AttributeXmlNode(Attribute attribute){
		this.name = attribute.getName();
		this.value = attribute.getValue();
	}

	public AttributeXmlNode(String name, String value) {
		this.name = name;
		this.value = value;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}

	@Override
	public String toXml() {
		return " " + name + "=\"" + value + "\" ";
	}

}
